package com.chengqs.controller;

import com.chengqs.pojo.BO.UserMoviePageQueryBO;
import com.chengqs.pojo.DTO.PageQuery;
import com.chengqs.pojo.R;
import com.chengqs.pojo.entity.UserMovie;
import com.chengqs.service.UserMovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/userMovies")
public class UserMovieController {
    @Autowired
    private UserMovieService userMovieService;
    @PostMapping("star")
    public R star(@RequestBody UserMovie userMovie){
        R isOverFlow = userMovieService.addToStar(userMovie);
        return isOverFlow;
    }

    @GetMapping("my/star")
    public R myStar(UserMoviePageQueryBO pageQuery){
        return userMovieService.myStar(pageQuery);
    }
}
